Enemies!

Kububbis' Game Dev Diary Issue #2

5/26/25

Back

Gamedev update!

Hello all! Welcome back to my blog!

This week I finished getting the basic architecture for enemies set up. I tried my hardest to program the enemies
in a way that would allow me to create new and different enemies easily. I took a modular approach when designing the code
which should save me a lot of headcahe later in development. I'm quite happy with how the scripts turned out.

The way that enemy movement works is that each enemy type follows a movement pattern made up of nodes (which are just x and y coordinates) set in their code. All enemies are instantiated
just off screen to the right. At the same time an enemy is instantiated it's first node is generated as well. The first node an enemy generates is called
a starter node and will always be somewhere on the right half of the frame. Once the enemy reaches it's starter node the rest of its nodes are generated
according to the path specefied in it's script. After the enemy completes its path it generates an exit node which is just off screen to the left.

Enemy attacks are pretty straightforward. The enemy shoots a specefied spray pattern at a fixed rate in seconds. 

There is a lot more complexity to the enemies and their code that took me a long time to design, especially regarding the modular functionality
but I won't discuss any of that in this post. I just wanted to give a basic overview of how the enemies would function in game. Also, please note
that there may be exceptions to the rules I wrote here with some special enemies in the final game (for example, an enemy which moves by teleporting
would not follow the same node-based path movement system as the rest of the enemies).

The test enemy I created is just a red circle with some basic andimations, but you get the gist of it.
Gameplay Demo

I am quite happy with how the enemy architecture turned out. Obviously it needs some polish and variety, but I think what I have built
is a great place to start filling the game with interesting enemies and mechanics.

Life update!

For this issue's life update I thought I would share a photo of this adorable Lego set that
my girlfriend got me. It's of a French cafe. My girlfriend knows how much I love coffee and cafes so she surprised me
with this set. I proudly display this piece on a shelf above my computer in my office. It makes me really happy whenever I
look at it.
	
	
Sylvie